package com.cloudsigns.factorymanager2.engineering.activity;

import android.app.Activity;
import android.content.Intent;
import android.graphics.Color;
import android.os.Build;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.GridView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import android.widget.Toast;

import com.cloudsigns.factorymanager2.R;
import com.cloudsigns.factorymanager2.cusenum.CommonEnum;
import com.cloudsigns.factorymanager2.engineering.IView.IPatrolFeedBackSureView;
import com.cloudsigns.factorymanager2.engineering.IView.IPatrolOrderDetailView;
import com.cloudsigns.factorymanager2.engineering.adapter.GridAdapter;
import com.cloudsigns.factorymanager2.engineering.bean.MediaBean;
import com.cloudsigns.factorymanager2.engineering.bean.PatrolFeedbackBean;
import com.cloudsigns.factorymanager2.engineering.bean.PatrolOrderBean;
import com.cloudsigns.factorymanager2.engineering.presenter.MediaListForPatrolMapForManagerPresenter;
import com.cloudsigns.factorymanager2.engineering.presenter.PatrolFeedBackSurePresenter;
import com.cloudsigns.factorymanager2.engineering.presenter.PatrolOrderDetailPresenter;
import com.cloudsigns.factorymanager2.engineering.presenter.RegionListPresenter;
import com.cloudsigns.factorymanager2.project.utils.ConstantUtil;
import com.cloudsigns.factorymanager2.project.utils.DateUtil;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by tony on 2018/6/22.
 */

public class PatrolFeedBackDetailForWaitStatuActivity extends Activity implements View.OnClickListener, IPatrolOrderDetailView, IPatrolFeedBackSureView {
    private RelativeLayout rl_back;
    private TextView tv_title;
    private TextView tv_project_name, tv_engineering_name;
    private TextView edt_shiyonghuanjing, edt_fangshuihuanjing;
    private GridView gridView_enviroment;
    private TextView edt_zhutijiegou, edt_anquankoussuo, edt_shengjiangxitong, edt_gangsuohualun, edt_waiguan, edt_huamian, edt_biaomianzhaodu;
    private TextView edt_zongdianya, edt_zongdianliu, edt_guangyuan, edt_dianyuan, edt_xianlan, edt_kaiguan, edt_duanzi, edt_biaomianwendu;
    private TextView edt_waibuqingjie;
    private TextView btn_submit;
    private GridAdapter gridAdapter;
    private List<String> serverUrlList = new ArrayList<>();
    private PatrolOrderDetailPresenter patrolOrderDetailPresenter;
    private PatrolFeedBackSurePresenter patrolFeedBackSurePresenter;
    private MediaBean mediaBean;
    private String orderId, itemId;
    private PatrolOrderBean patrolOrderBean;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        this.requestWindowFeature(Window.FEATURE_NO_TITLE);//去掉标题栏
        // 沉浸式状态栏
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
            Window window = getWindow();
            window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS
                    );
            window.getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN

                    | View.SYSTEM_UI_FLAG_LAYOUT_STABLE);
            window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
            window.setStatusBarColor(Color.TRANSPARENT);

        } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
            getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
        }
        setContentView(R.layout.layout_view_feedback_detail_for_patrol);

        patrolOrderDetailPresenter = new PatrolOrderDetailPresenter(this);
        patrolFeedBackSurePresenter = new PatrolFeedBackSurePresenter(this);
        init();

        Intent mIntent = getIntent();
        if (null != mIntent) {
            mediaBean = (MediaBean) mIntent.getSerializableExtra(ConstantUtil.KEY_2);
            if (null != mediaBean) {
                orderId = mediaBean.getOrderId();
                itemId = mediaBean.getId();

                tv_project_name.setText(mediaBean.getMediaName());
                tv_engineering_name.setText("/" + mediaBean.getRegionName() + "/" + mediaBean.getAssignReceiveAccountName() +  DateUtil.getYyyy_Mm_Dd(mediaBean.getHandleDate()));

            }
        }

        patrolOrderDetailPresenter.getPatrolOrderDetail();

    }

    private void init() {
        rl_back = findViewById(R.id.rl_back);
        tv_title = findViewById(R.id.tv_title);
        tv_project_name = findViewById(R.id.tv_project_name);
        tv_engineering_name = findViewById(R.id.tv_engineering_name);
        edt_shiyonghuanjing = findViewById(R.id.edt_shiyonghuanjing);
        edt_fangshuihuanjing = findViewById(R.id.edt_fangshuihuanjing);
        gridView_enviroment = findViewById(R.id.gridView_enviroment);
        edt_zhutijiegou = findViewById(R.id.edt_zhutijiegou);
        edt_anquankoussuo = findViewById(R.id.edt_anquankoussuo);
        edt_shengjiangxitong = findViewById(R.id.edt_shengjiangxitong);
        edt_gangsuohualun = findViewById(R.id.edt_gangsuohualun);
        edt_waiguan = findViewById(R.id.edt_waiguan);
        edt_huamian = findViewById(R.id.edt_huamian);
        edt_biaomianzhaodu = findViewById(R.id.edt_biaomianzhaodu);
        edt_zongdianya = findViewById(R.id.edt_zongdianya);
        edt_zongdianliu = findViewById(R.id.edt_zongdianliu);
        edt_guangyuan = findViewById(R.id.edt_guangyuan);
        edt_dianyuan = findViewById(R.id.edt_dianyuan);
        edt_xianlan = findViewById(R.id.edt_xianlan);
        edt_kaiguan = findViewById(R.id.edt_kaiguan);
        edt_duanzi = findViewById(R.id.edt_duanzi);
        edt_biaomianwendu = findViewById(R.id.edt_biaomianwendu);
        edt_waibuqingjie = findViewById(R.id.edt_waibuqingjie);
        btn_submit = findViewById(R.id.btn_submit);

        gridView_enviroment.setNumColumns(3);
        gridAdapter = new GridAdapter(this);
        gridAdapter.setData(serverUrlList);
        gridView_enviroment.setAdapter(gridAdapter);

        tv_title.setText("巡查反馈");

        rl_back.setOnClickListener(this);
        btn_submit.setOnClickListener(this);
    }

    private void initData() {
        if (null != patrolOrderBean) {

            List<PatrolFeedbackBean> patrolFeedbackBeanList = patrolOrderBean.getPatrolFeedbackList();
            if (null != patrolFeedbackBeanList && patrolFeedbackBeanList.size() > 0) {
                PatrolFeedbackBean patrolFeedbackBean = patrolFeedbackBeanList.get(0);
                if (null != patrolFeedbackBean) {
                    edt_biaomianzhaodu.setText(patrolFeedbackBean.getBright());
                    edt_xianlan.setText(patrolFeedbackBean.getCable());
                    edt_zongdianliu.setText(patrolFeedbackBean.getCurrent());

                    List<String> environmentImgUrlList = patrolFeedbackBean.getEnvironmentImgUrlList();
                    if (null != environmentImgUrlList) {
                        serverUrlList.clear();
                        serverUrlList.addAll(environmentImgUrlList);
                        gridAdapter.setData(serverUrlList);
                        gridAdapter.notifyDataSetChanged();
                    }

                    CommonEnum.LIFTSYSTEM liftsystem = patrolFeedbackBean.getLiftSystem();
                    if (null != liftsystem) {
                        if (liftsystem == CommonEnum.LIFTSYSTEM.NORMAL) {
                            edt_shengjiangxitong.setText("正常");
                        } else if (liftsystem == CommonEnum.LIFTSYSTEM.SHIELD) {
                            edt_shengjiangxitong.setText("遮蔽");
                        } else if (liftsystem == CommonEnum.LIFTSYSTEM.LEAK) {
                            edt_shengjiangxitong.setText("漏水");
                        } else if (liftsystem == CommonEnum.LIFTSYSTEM.RUST) {
                            edt_shengjiangxitong.setText("生锈");
                        } else if (liftsystem == CommonEnum.LIFTSYSTEM.VARIANT) {
                            edt_shengjiangxitong.setText("变形");
                        } else if (liftsystem == CommonEnum.LIFTSYSTEM.LOOSE) {
                            edt_shengjiangxitong.setText("松动");
                        } else if (liftsystem == CommonEnum.LIFTSYSTEM.MALFUNCTION) {
                            edt_shengjiangxitong.setText("故障");

                        } else if (liftsystem == CommonEnum.LIFTSYSTEM.WEAR) {
                            edt_shengjiangxitong.setText("磨损");
                        } else if (liftsystem == CommonEnum.LIFTSYSTEM.NOT_CLEAN) {
                            edt_shengjiangxitong.setText("不洁");
                        } else if (liftsystem == CommonEnum.LIFTSYSTEM.PLICATED) {
                            edt_shengjiangxitong.setText("折皱");
                        } else if (liftsystem == CommonEnum.LIFTSYSTEM.TEAR) {
                            edt_shengjiangxitong.setText("撕裂");
                        } else if (liftsystem == CommonEnum.LIFTSYSTEM.SCRATCH) {
                            edt_shengjiangxitong.setText("划伤");
                        }
                    }

                    edt_guangyuan.setText(patrolFeedbackBean.getLight());

                    CommonEnum.LIFTSYSTEM majorStructure = patrolFeedbackBean.getMajorStructure();
                    if (null != majorStructure) {
                        if (majorStructure == CommonEnum.LIFTSYSTEM.NORMAL) {
                            edt_zhutijiegou.setText("正常");
                        } else if (majorStructure == CommonEnum.LIFTSYSTEM.SHIELD) {
                            edt_zhutijiegou.setText("遮蔽");
                        } else if (majorStructure == CommonEnum.LIFTSYSTEM.LEAK) {
                            edt_zhutijiegou.setText("漏水");
                        } else if (majorStructure == CommonEnum.LIFTSYSTEM.RUST) {
                            edt_zhutijiegou.setText("生锈");
                        } else if (majorStructure == CommonEnum.LIFTSYSTEM.VARIANT) {
                            edt_zhutijiegou.setText("变形");
                        } else if (majorStructure == CommonEnum.LIFTSYSTEM.LOOSE) {
                            edt_zhutijiegou.setText("松动");
                        } else if (majorStructure == CommonEnum.LIFTSYSTEM.MALFUNCTION) {
                            edt_zhutijiegou.setText("故障");

                        } else if (majorStructure == CommonEnum.LIFTSYSTEM.WEAR) {
                            edt_zhutijiegou.setText("磨损");
                        } else if (majorStructure == CommonEnum.LIFTSYSTEM.NOT_CLEAN) {
                            edt_zhutijiegou.setText("不洁");
                        } else if (majorStructure == CommonEnum.LIFTSYSTEM.PLICATED) {
                            edt_zhutijiegou.setText("折皱");
                        } else if (majorStructure == CommonEnum.LIFTSYSTEM.TEAR) {
                            edt_zhutijiegou.setText("撕裂");
                        } else if (majorStructure == CommonEnum.LIFTSYSTEM.SCRATCH) {
                            edt_zhutijiegou.setText("划伤");
                        }
                    }

                    edt_kaiguan.setText(patrolFeedbackBean.getOn_off());


                    CommonEnum.LIFTSYSTEM outline = patrolFeedbackBean.getOutline();
                    if (null != outline) {
                        if (outline == CommonEnum.LIFTSYSTEM.NORMAL) {
                            edt_waiguan.setText("正常");
                        } else if (outline == CommonEnum.LIFTSYSTEM.SHIELD) {
                            edt_waiguan.setText("遮蔽");
                        } else if (outline == CommonEnum.LIFTSYSTEM.LEAK) {
                            edt_waiguan.setText("漏水");
                        } else if (outline == CommonEnum.LIFTSYSTEM.RUST) {
                            edt_waiguan.setText("生锈");
                        } else if (outline == CommonEnum.LIFTSYSTEM.VARIANT) {
                            edt_waiguan.setText("变形");
                        } else if (outline == CommonEnum.LIFTSYSTEM.LOOSE) {
                            edt_waiguan.setText("松动");
                        } else if (outline == CommonEnum.LIFTSYSTEM.MALFUNCTION) {
                            edt_waiguan.setText("故障");

                        } else if (outline == CommonEnum.LIFTSYSTEM.WEAR) {
                            edt_waiguan.setText("磨损");
                        } else if (outline == CommonEnum.LIFTSYSTEM.NOT_CLEAN) {
                            edt_waiguan.setText("不洁");
                        } else if (outline == CommonEnum.LIFTSYSTEM.PLICATED) {
                            edt_waiguan.setText("折皱");
                        } else if (outline == CommonEnum.LIFTSYSTEM.TEAR) {
                            edt_waiguan.setText("撕裂");
                        } else if (outline == CommonEnum.LIFTSYSTEM.SCRATCH) {
                            edt_waiguan.setText("划伤");
                        }
                    }

                    CommonEnum.LIFTSYSTEM picture = patrolFeedbackBean.getPicture();
                    if (null != picture) {
                        if (picture == CommonEnum.LIFTSYSTEM.NORMAL) {
                            edt_huamian.setText("正常");
                        } else if (picture == CommonEnum.LIFTSYSTEM.SHIELD) {
                            edt_huamian.setText("遮蔽");
                        } else if (picture == CommonEnum.LIFTSYSTEM.LEAK) {
                            edt_huamian.setText("漏水");
                        } else if (picture == CommonEnum.LIFTSYSTEM.RUST) {
                            edt_huamian.setText("生锈");
                        } else if (picture == CommonEnum.LIFTSYSTEM.VARIANT) {
                            edt_huamian.setText("变形");
                        } else if (picture == CommonEnum.LIFTSYSTEM.LOOSE) {
                            edt_huamian.setText("松动");
                        } else if (picture == CommonEnum.LIFTSYSTEM.MALFUNCTION) {
                            edt_huamian.setText("故障");

                        } else if (picture == CommonEnum.LIFTSYSTEM.WEAR) {
                            edt_huamian.setText("磨损");
                        } else if (picture == CommonEnum.LIFTSYSTEM.NOT_CLEAN) {
                            edt_huamian.setText("不洁");
                        } else if (picture == CommonEnum.LIFTSYSTEM.PLICATED) {
                            edt_huamian.setText("折皱");
                        } else if (picture == CommonEnum.LIFTSYSTEM.TEAR) {
                            edt_huamian.setText("撕裂");
                        } else if (picture == CommonEnum.LIFTSYSTEM.SCRATCH) {
                            edt_huamian.setText("划伤");
                        }
                    }

                    edt_duanzi.setText(patrolFeedbackBean.getPort());
                    edt_dianyuan.setText(patrolFeedbackBean.getPower());

                    List<CommonEnum.PRESERVELIST> preserveList = patrolFeedbackBean.getPreserveList();
                    if (null != preserveList) {
                        for (CommonEnum.PRESERVELIST preserve : preserveList) {
                            if (preserve == CommonEnum.PRESERVELIST.OUT_CLEAN)
                                edt_waibuqingjie.setText("外部清洁");
                        }
                    }

                    CommonEnum.LIFTSYSTEM pulley = patrolFeedbackBean.getPulley();
                    if (null != pulley) {
                        if (pulley == CommonEnum.LIFTSYSTEM.NORMAL) {
                            edt_gangsuohualun.setText("正常");
                        } else if (pulley == CommonEnum.LIFTSYSTEM.SHIELD) {
                            edt_gangsuohualun.setText("遮蔽");
                        } else if (pulley == CommonEnum.LIFTSYSTEM.LEAK) {
                            edt_gangsuohualun.setText("漏水");
                        } else if (pulley == CommonEnum.LIFTSYSTEM.RUST) {
                            edt_gangsuohualun.setText("生锈");
                        } else if (pulley == CommonEnum.LIFTSYSTEM.VARIANT) {
                            edt_gangsuohualun.setText("变形");
                        } else if (pulley == CommonEnum.LIFTSYSTEM.LOOSE) {
                            edt_gangsuohualun.setText("松动");
                        } else if (pulley == CommonEnum.LIFTSYSTEM.MALFUNCTION) {
                            edt_gangsuohualun.setText("故障");

                        } else if (pulley == CommonEnum.LIFTSYSTEM.WEAR) {
                            edt_gangsuohualun.setText("磨损");
                        } else if (pulley == CommonEnum.LIFTSYSTEM.NOT_CLEAN) {
                            edt_gangsuohualun.setText("不洁");
                        } else if (pulley == CommonEnum.LIFTSYSTEM.PLICATED) {
                            edt_gangsuohualun.setText("折皱");
                        } else if (pulley == CommonEnum.LIFTSYSTEM.TEAR) {
                            edt_gangsuohualun.setText("撕裂");
                        } else if (pulley == CommonEnum.LIFTSYSTEM.SCRATCH) {
                            edt_gangsuohualun.setText("划伤");
                        }
                    }

                    CommonEnum.LIFTSYSTEM safeLock = patrolFeedbackBean.getSafeLock();
                    if (null != safeLock) {
                        if (safeLock == CommonEnum.LIFTSYSTEM.NORMAL) {
                            edt_anquankoussuo.setText("正常");
                        } else if (safeLock == CommonEnum.LIFTSYSTEM.SHIELD) {
                            edt_anquankoussuo.setText("遮蔽");
                        } else if (safeLock == CommonEnum.LIFTSYSTEM.LEAK) {
                            edt_anquankoussuo.setText("漏水");
                        } else if (safeLock == CommonEnum.LIFTSYSTEM.RUST) {
                            edt_anquankoussuo.setText("生锈");
                        } else if (safeLock == CommonEnum.LIFTSYSTEM.VARIANT) {
                            edt_anquankoussuo.setText("变形");
                        } else if (safeLock == CommonEnum.LIFTSYSTEM.LOOSE) {
                            edt_anquankoussuo.setText("松动");
                        } else if (safeLock == CommonEnum.LIFTSYSTEM.MALFUNCTION) {
                            edt_anquankoussuo.setText("故障");

                        } else if (safeLock == CommonEnum.LIFTSYSTEM.WEAR) {
                            edt_anquankoussuo.setText("磨损");
                        } else if (safeLock == CommonEnum.LIFTSYSTEM.NOT_CLEAN) {
                            edt_anquankoussuo.setText("不洁");
                        } else if (safeLock == CommonEnum.LIFTSYSTEM.PLICATED) {
                            edt_anquankoussuo.setText("折皱");
                        } else if (safeLock == CommonEnum.LIFTSYSTEM.TEAR) {
                            edt_anquankoussuo.setText("撕裂");
                        } else if (safeLock == CommonEnum.LIFTSYSTEM.SCRATCH) {
                            edt_anquankoussuo.setText("划伤");
                        }
                    }

                    edt_biaomianwendu.setText(patrolFeedbackBean.getTemperature());

                    CommonEnum.LIFTSYSTEM useEnvironment = patrolFeedbackBean.getUseEnvironment();
                    if (null != useEnvironment) {
                        if (useEnvironment == CommonEnum.LIFTSYSTEM.NORMAL) {
                            edt_shiyonghuanjing.setText("正常");
                        } else if (useEnvironment == CommonEnum.LIFTSYSTEM.SHIELD) {
                            edt_shiyonghuanjing.setText("遮蔽");
                        } else if (useEnvironment == CommonEnum.LIFTSYSTEM.LEAK) {
                            edt_shiyonghuanjing.setText("漏水");
                        } else if (useEnvironment == CommonEnum.LIFTSYSTEM.RUST) {
                            edt_shiyonghuanjing.setText("生锈");
                        } else if (useEnvironment == CommonEnum.LIFTSYSTEM.VARIANT) {
                            edt_shiyonghuanjing.setText("变形");
                        } else if (useEnvironment == CommonEnum.LIFTSYSTEM.LOOSE) {
                            edt_shiyonghuanjing.setText("松动");
                        } else if (useEnvironment == CommonEnum.LIFTSYSTEM.MALFUNCTION) {
                            edt_shiyonghuanjing.setText("故障");

                        } else if (useEnvironment == CommonEnum.LIFTSYSTEM.WEAR) {
                            edt_shiyonghuanjing.setText("磨损");
                        } else if (useEnvironment == CommonEnum.LIFTSYSTEM.NOT_CLEAN) {
                            edt_shiyonghuanjing.setText("不洁");
                        } else if (useEnvironment == CommonEnum.LIFTSYSTEM.PLICATED) {
                            edt_shiyonghuanjing.setText("折皱");
                        } else if (useEnvironment == CommonEnum.LIFTSYSTEM.TEAR) {
                            edt_shiyonghuanjing.setText("撕裂");
                        } else if (useEnvironment == CommonEnum.LIFTSYSTEM.SCRATCH) {
                            edt_shiyonghuanjing.setText("划伤");
                        }
                    }

                    edt_zongdianya.setText(patrolFeedbackBean.getVoltage());

                    CommonEnum.LIFTSYSTEM waterProofEnvironment = patrolFeedbackBean.getWaterProofEnvironment();
                    if (null != waterProofEnvironment) {
                        if (waterProofEnvironment == CommonEnum.LIFTSYSTEM.NORMAL) {
                            edt_shiyonghuanjing.setText("正常");
                        } else if (waterProofEnvironment == CommonEnum.LIFTSYSTEM.SHIELD) {
                            edt_shiyonghuanjing.setText("遮蔽");
                        } else if (waterProofEnvironment == CommonEnum.LIFTSYSTEM.LEAK) {
                            edt_shiyonghuanjing.setText("漏水");
                        } else if (waterProofEnvironment == CommonEnum.LIFTSYSTEM.RUST) {
                            edt_shiyonghuanjing.setText("生锈");
                        } else if (waterProofEnvironment == CommonEnum.LIFTSYSTEM.VARIANT) {
                            edt_shiyonghuanjing.setText("变形");
                        } else if (waterProofEnvironment == CommonEnum.LIFTSYSTEM.LOOSE) {
                            edt_shiyonghuanjing.setText("松动");
                        } else if (waterProofEnvironment == CommonEnum.LIFTSYSTEM.MALFUNCTION) {
                            edt_shiyonghuanjing.setText("故障");

                        } else if (waterProofEnvironment == CommonEnum.LIFTSYSTEM.WEAR) {
                            edt_shiyonghuanjing.setText("磨损");
                        } else if (waterProofEnvironment == CommonEnum.LIFTSYSTEM.NOT_CLEAN) {
                            edt_shiyonghuanjing.setText("不洁");
                        } else if (waterProofEnvironment == CommonEnum.LIFTSYSTEM.PLICATED) {
                            edt_shiyonghuanjing.setText("折皱");
                        } else if (waterProofEnvironment == CommonEnum.LIFTSYSTEM.TEAR) {
                            edt_shiyonghuanjing.setText("撕裂");
                        } else if (waterProofEnvironment == CommonEnum.LIFTSYSTEM.SCRATCH) {
                            edt_shiyonghuanjing.setText("划伤");
                        }
                    }

                }
            }
        }
    }

    private void sureFeedBack() {
        patrolFeedBackSurePresenter.patrolFeedBackSure();
    }

    @Override
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.rl_back:
                finish();
                break;
            case R.id.btn_submit:
                sureFeedBack();
                break;
        }
    }

    @Override
    public String getContent() {
        return "巡查日反馈确认";
    }

    @Override
    public String getItemId() {

        return itemId;
    }

    @Override
    public String getOrderId() {
        return orderId;
    }

    @Override
    public CommonEnum.EngineeringORderCategory getType() {
        return CommonEnum.EngineeringORderCategory.PATROL;
    }

    @Override
    public void patrolFeedBackSureSuccessed() {
        Toast.makeText(this, "反馈确认成功", Toast.LENGTH_SHORT).show();
        Intent mIntent = new Intent();
        setResult(RESULT_OK, mIntent);
        finish();
    }

    @Override
    public void patrolFeedBackSureFailed(String desc) {
        Toast.makeText(this, desc, Toast.LENGTH_SHORT).show();
    }

    @Override
    public void getPatrolOrderDetailSuccessed(PatrolOrderBean orderBean) {
        this.patrolOrderBean = orderBean;
        initData();
    }

    @Override
    public void gPatrolOrderDetailFailed(String desc) {
        Toast.makeText(this, desc, Toast.LENGTH_SHORT).show();
    }

    @Override
    public void showLoading() {

    }

    @Override
    public void hideLoading() {

    }
}
